#include <nds.h>
#include <stdio.h>

/*
-
- 
-
*/
void rotate(int bg, s16 rcX, s16 rcY, s16 angle, s16 scaleX, s16 scaleY, s16 scrollX, s16 scrollY, int priority){

  bgSetCenter(bg, rcX, rcY);
  bgSetRotateScale(bg, angle, scaleX, scaleY);
  bgSetScroll(bg, scrollX, scrollY);
  bgSetPriority(bg, priority);
  bgUpdate();

}

/*
-
-
-
*/
void clearBackGrounds(u16* backGrounds[], int arrayLen){

  int bgs;
  int pixels;

  for(bgs = 0; bgs <= arrayLen; bgs++)
    for(pixels = 0; pixels < 256*192; pixels++)
      backGrounds[bgs][pixels] = RGB15(0, 0, 0);

}

/*
-
- 
-
*/
int initBg(bool main, int layer, int type, int size, int mapBase, int tileBase){

  int bg;

  if(main)
    bg = bgInit(layer, type, size, mapBase, tileBase);
  else
    bg = bgInitSub(layer, type, size, mapBase, tileBase);

  return bg;

}